<%--
    Document   : LibraryBook
    Created on : 14.02.2010, 12:34:31
    Author     : Morfant
--%>

<%@page import="stud.cp.user.valueobjects.DBObjectType"%>
<%@page import="stud.cp.user.valueobjects.PropertyGroup"%>
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <%@include file="/header.jsp" %>
    <body>
        <div class="page">
            <%@include file="/cap.jsp" %>
            <div id="main">
                <%DBObjectType objectType = (DBObjectType) request.getAttribute(PluginConst.object_TYPE);
                            if (objectType != null) {%>
                <div id="objectmenucontainer">
                    <ul id="objectmenu">
                        <li><a href="<%= response.encodeURL("object-type-action.do")
                                                + "?"
                                                + PluginConst.SUBACTION
                                                + "="
                                                + PluginConst.GET_VIEW_PAGE
                                                + "&"
                                                + PluginConst.object_TYPE_ID
                                                + "="
                                                + objectType.getObject_type_id()%>">Просмотр данных</a></li>
                        <li><a href="<%= response.encodeURL("object-type-action.do")
                                                + "?"
                                                + PluginConst.SUBACTION
                                                + "="
                                                + PluginConst.GET_object_TYPE_PROPERTIES_LIST
                                                + "&"
                                                + PluginConst.object_TYPE_ID
                                                + "="
                                                + objectType.getObject_type_id()%>">Список cвойств</a></li>
                    </ul>
                </div>
                <h2>Тип оружия</h2>
                <table id="buttontable">
                    <tr>
                        <th>
                            <div id="objectmenucontainer">
                                <ul id="objectmenu">
                                    <li><a href="<%= response.encodeURL("object-type-action.do")
                                                            + "?"
                                                            + PluginConst.SUBACTION
                                                            + "="
                                                            + PluginConst.GET_EDIT_PAGE
                                                            + "&"
                                                            + PluginConst.object_TYPE_ID
                                                            + "="
                                                            + objectType.getObject_type_id()%>">Редактировать</a></li>
                                </ul>
                            </div>
                        </th>
                        <th>
                            <div id="objectmenucontainer">
                                <ul id="objectmenu">
                                    <li><a href="<%= response.encodeURL("object-type-action.do")
                                                            + "?"
                                                            + PluginConst.SUBACTION
                                                            + "="
                                                            + PluginConst.GET_DELETE_PAGE
                                                            + "&"
                                                            + PluginConst.object_TYPE_ID
                                                            + "="
                                                            + objectType.getObject_type_id()%>">Удалить</a></li>
                                </ul>
                            </div>
                        </th>
                    </tr>
                </table>
                <fieldset>
                    <legend>Данные</legend>
                    <p>
                        <span class="highlight-delete-item">
                            <label for="<%=PluginConst.object_TYPE_NAME%>">
                                Название типа оружия:
                            </label>
                        </span>
                        <%=objectType.getName()%>
                    <p/>
                    <p>
                        <span class="highlight-delete-item">
                            <label for="<%=PluginConst.object_TYPE_DESCRIPTION%>">
                                Описание типа оружия:
                            </label>
                        </span>
                        <textarea readonly
                                  rows="5"
                                  cols="40"
                                  name="show"
                                  ><%=objectType.getDescription()%></textarea>
                    <p/>
                </fieldset>
                <%}%>
                <div id="objectmenucontainer">
                    <ul id="objectmenu">
                        <li><a href="<%= response.encodeURL("object-type-action.do")
                                                + "?"
                                                + PluginConst.SUBACTION
                                                + "="
                                                + PluginConst.GET_LIST%>">Вернуться к списку типов оружия</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </body>
</html>
